import { createI18n } from 'vue-i18n' //引入vue-i18n组件
import messages from './index'

let language = null
const local = localStorage.getItem("themes")
if (local) {
    language = JSON.parse(local).language
} else {
    language = 'ch'
}
const i18n = createI18n({
    fallbackLocale: 'ch',//预设语言环境
    globalInjection: true,
    legacy: false, // you must specify 'legacy: false' option
    locale: language,
    messages,//本地化的语言环境信息。
});

export default i18n
